<script lang="ts" setup>
import {
  Document,
  Menu as IconMenu,
  Location,
  Setting,
  Star,
  Shop,
} from '@element-plus/icons-vue'

const handleOpen = (key: string, keyPath: string[]) => {
  console.log(key, keyPath)
}
const handleClose = (key: string, keyPath: string[]) => {
  console.log(key, keyPath)
}
</script>


<template>
  <div class="common-layout">
    <el-container>
      <el-header class="header">Header</el-header>
      <el-container class="container">
        <el-aside width="200px" class="aside">

          <el-menu default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose">

            <el-menu-item index="1">
              <el-icon><icon-menu /></el-icon>
           
              <router-link :to="{path: '/home/member'}">机试-会员管理</router-link>
            </el-menu-item>

             <el-menu-item index="2">
                <el-icon><Shop /></el-icon>
              <!-- <el-icon><Setting /></el-icon> -->
              <span></span>
              <router-link :to="{path: '/home/newsType'}">新闻类型列表</router-link>
            </el-menu-item>

 
          </el-menu>


        </el-aside>

        <!-- 右边的视图 -->
        <el-main class="main">
          <RouterView></RouterView>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<style scoped>
.header,
.aside,
.main {
  border: 1px solid red
}

.container {
  height: 100vh
}
</style>